package org.rcy.framework.thrift.metadata;

import java.io.Serializable;

public final class ExceptionData implements Serializable {

	private static final long serialVersionUID = 1L;

	private String className;
	private String message;
	private Exception exception;

	public ExceptionData() {}
	
	public ExceptionData(Exception e) {
		this.exception = e;
		this.className = e.getClass().getName();
		this.message = e.getMessage() == null ? className : e.getMessage();
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}